package us.icitap.cm.business.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.eclipse.persistence.annotations.Customizer;

import us.icitap.cm.utils.MyCustomizer;

import com.sun.xml.ws.developer.StreamingAttachment;

@Entity
@Customizer(MyCustomizer.class)
@Table(name="MED_EDU_MEASURE", schema="MPC")
@IdClass(MedEduMeasureId.class)
public class MedicalEducationalMeasure implements Serializable{

	@Id
	private Integer id;
	
	@Id
	@Column(name="CHARGE_ID", insertable=false, updatable=false)
	private Integer chargeId;
	
	@Id
	@Column(name="PERSON_ID", insertable=false, updatable=false)
	private Integer personId;
	
	
	@ManyToOne
	@JoinColumns({@JoinColumn(name = "CHARGE_ID", referencedColumnName = "ID"), @JoinColumn(name = "PERSON_ID", referencedColumnName = "PERSON_ID")})
	private Charge charge;
	
	@ManyToOne
	@JoinColumn(name="MED_EDU_MEASURE_TYPE_ID")
	private AppList medEduMeasureType;
	
	@Column(name="INSTITUTION_NAME", length=150)
	private String institutionName;
	
	@Column(length=200)
	private String notes;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getChargeId() {
		return chargeId;
	}

	public void setChargeId(Integer chargeId) {
		this.chargeId = chargeId;
	}

	public Integer getPersonId() {
		return personId;
	}

	public void setPersonId(Integer personId) {
		this.personId = personId;
	}

	public Charge getCharge() {
		return charge;
	}

	public void setCharge(Charge charge) {
		this.charge = charge;
	}

	public AppList getMedEduMeasureType() {
		return medEduMeasureType;
	}

	public void setMedEduMeasureType(AppList medEduMeasureType) {
		this.medEduMeasureType = medEduMeasureType;
	}

	public String getInstitutionName() {
		return institutionName;
	}

	public void setInstitutionName(String institutionName) {
		this.institutionName = institutionName;
	}

	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}
	
}
